import java.util.Scanner;

public class MobileInventory {
    public static void main(String[] args) {
        // 初始化手机信息
        Mobile huawei = new Mobile("华为", "5.5", 3688.88, "8+128g全面刘海屏");
        Mobile xiaomi = new Mobile("小米", "5.0", 2988.88, "4+64g全面屏");

        // 创建输入对象
        Scanner scanner = new Scanner(System.in);

        // 输入华为手机库存数量
        System.out.print("请输入华为手机的库存数量: ");
        int huaweiQuantity = scanner.nextInt();
        huawei.setInventory(huaweiQuantity);

        // 输入小米手机库存数量
        System.out.print("请输入小米手机的库存数量: ");
        int xiaomiQuantity = scanner.nextInt();
        xiaomi.setInventory(xiaomiQuantity);

        // 计算库存总金额
        double totalAmount = (huawei.getInventory() * huawei.getPrice()) + (xiaomi.getInventory() * xiaomi.getPrice());

        // 打印库存清单
        System.out.println("--------------------库存清单------------------");
        System.out.println("品牌型号\t尺寸\t价格\t配置\t库存数量\t总价");
        System.out.println(huawei.getBrand() + "\t" + huawei.getSize() + "\t" + huawei.getPrice() + "\t" + huawei.getDisposition() + "\t" + huawei.getInventory() + "\t" + (huawei.getInventory() * huawei.getPrice()));
        System.out.println(xiaomi.getBrand() + "\t" + xiaomi.getSize() + "\t" + xiaomi.getPrice() + "\t" + xiaomi.getDisposition() + "\t" + xiaomi.getInventory() + "\t" + (xiaomi.getInventory() * xiaomi.getPrice()));
        System.out.println("-------------------------------------------");
        System.out.println("总库存: " + (huawei.getDisposition() + xiaomi.getDisposition()));
        System.out.println("库存总价: " + totalAmount + "￥");

        // 关闭输入对象
        scanner.close();
    }
}

class Mobile {
    private String brand;
    private String size;
    private double price;
    private String disposition;
    private int inventory;

    public Mobile(String brand, String size, double price, String disposition) {
        this.brand = brand;
        this.size = size;
        this.price = price;
        this.disposition = disposition;
        this.inventory = 0;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getSize() {
        return size;
    }

    public void setSize(String size) {
        this.size = size;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getDisposition() {
        return disposition;
    }

    public void setDisposition(String disposition) {
        this.disposition = disposition;
    }

    public int getInventory() {
        return inventory;
    }

    public void setInventory(int inventory) {
        this.inventory = inventory;
    }
}
